c74288157552a8b00a8f40d55f3a0c6403840078,usage/rest-server/src/main/java/brooklyn/rest/util/WebResourceUtils.java,WebResourceUtils,badRequest,#String#Object#,42

Before Change



    /** @throws WebApplicationException With code 400 bad request */
    public static WebApplicationException badRequest(String format, Object... args) {
        String msg = String.format(format, args);
        if (log.isDebugEnabled()) log.debug("returning 400 bad request ("+msg+")");
        throw new WebApplicationException(Response.status(Response.Status.BAD_REQUEST)
                .type(MediaType.APPLICATION_JSON_TYPE)
                .entity(ApiError.builder().message(msg).build()).build());
    }

    /** @throws WebApplicationException With code 401 unauthorized */

After Change


    }

    /** @throws WebApplicationException With code 400 bad request */
    public static WebApplicationException badRequest(String format, Object... args) {
        return throwWebApplicationException(Response.Status.BAD_REQUEST, format, args);
    }

    /** @throws WebApplicationException With code 401 unauthorized */